package com.ifood.system.service.impl;

import java.util.List;

import com.ifood.common.core.domain.entity.SysIconInfo;
import com.ifood.common.utils.DateUtils;
import com.ifood.system.mapper.SysIconInfoMapper;
import com.ifood.system.service.ISysIconInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * icon管理Service业务层处理
 *
 * @author ifood
 * @date 2024-01-08
 */
@Service
public class SysIconInfoServiceImpl implements ISysIconInfoService {
    @Autowired
    private SysIconInfoMapper sysIconInfoMapper;

    /**
     * 查询icon管理
     *
     * @param id icon管理主键
     * @return icon管理
     */
    @Override
    public SysIconInfo selectSysIconInfoById(Long id) {
        return sysIconInfoMapper.selectSysIconInfoById(id);
    }

    /**
     * 查询icon管理列表
     *
     * @param sysIconInfo icon管理
     * @return icon管理
     */
    @Override
    public List<SysIconInfo> selectSysIconInfoList(SysIconInfo sysIconInfo) {
        return sysIconInfoMapper.selectSysIconInfoList(sysIconInfo);
    }

    /**
     * 新增icon管理
     *
     * @param sysIconInfo icon管理
     * @return 结果
     */
    @Override
    public int insertSysIconInfo(SysIconInfo sysIconInfo) {
        sysIconInfo.setCreateTime(DateUtils.getNowDate());
        return sysIconInfoMapper.insertSysIconInfo(sysIconInfo);
    }

    /**
     * 修改icon管理
     *
     * @param sysIconInfo icon管理
     * @return 结果
     */
    @Override
    public int updateSysIconInfo(SysIconInfo sysIconInfo) {
        sysIconInfo.setUpdateTime(DateUtils.getNowDate());
        return sysIconInfoMapper.updateSysIconInfo(sysIconInfo);
    }

    /**
     * 批量删除icon管理
     *
     * @param ids 需要删除的icon管理主键
     * @return 结果
     */
    @Override
    public int deleteSysIconInfoByIds(Long[] ids) {
        return sysIconInfoMapper.deleteSysIconInfoByIds(ids);
    }

    /**
     * 删除icon管理信息
     *
     * @param id icon管理主键
     * @return 结果
     */
    @Override
    public int deleteSysIconInfoById(Long id) {
        return sysIconInfoMapper.deleteSysIconInfoById(id);
    }
}
